<template>
	<view class="car-highlights">
		<view class="title">车辆亮点</view>
		<view class="enum">
			<view class="cell" v-if="info.strength.platformName">
				<view class="tag">接单平台</view>
				<view class="name">{{ info.platformName }}</view>
			</view>
			<view class="cell" v-if="info.strength.advantage">
				<view class="tag">优势</view>
				<view class="name">{{ info.strength.advantage }}</view>
			</view>
			<view class="cell" v-if="info.strength.compliance">
				<view class="tag">合规</view>
				<view class="name">{{ info.strength.compliance }}</view>
			</view>
			<view class="cell" v-if="info.strength.registration">
				<view class="tag">上牌</view>
				<view class="name">{{ info.strength.registration }}</view>
			</view>
			<view class="cell" v-if="info.strength.activity">
				<view class="tag">活动</view>
				<view class="name">{{ info.strength.activity }}</view>
			</view>
		</view>
	</view>
</template>

<script setup>
	import {
		defineProps
	} from 'vue'
	defineProps({
		info: {
			type: Object,
			default: () => {
				strength: {}
			}
		}
	})
</script>

<style lang="scss" scoped>
	.car-highlights {
		margin-top: 28rpx;
		padding: 24rpx;
		box-sizing: border-box;
		border-radius: 16rpx;
		background: #FFFFFF;

		.title {
			font-size: 36rpx;
			font-family: PingFang SC-Bold, PingFang SC;
			font-weight: bold;
			color: #333333;
		}

		.enum {
			margin-top: 30rpx;

			.cell {
				display: flex;
				align-items: center;

				&:not(:first-child) {
					margin-top: 20rpx;
				}

				.tag {
					width: 126rpx;
					line-height: 48rpx;
					background: #E6EEFB;
					border-radius: 12rpx 0rpx 12rpx 0rpx;
					font-size: 26rpx;
					font-family: PingFang SC-Bold, PingFang SC;
					font-weight: bold;
					color: #2758E7;
					text-align: center;
				}

				.name {
					margin-left: 16rpx;
					font-size: 30rpx;
					font-family: PingFang SC-Regular, PingFang SC;
					font-weight: 400;
					color: #333333;
				}

				&:nth-child(even) {
					.tag {
						background: #FFF4F1;
						color: #FE592D;
					}
				}
			}
		}
	}
</style>